<%@ page import="com.opensymphony.xwork2.ActionContext" %>
<%@ page import="drrr.orm.RoomEntity" %>
<%--
  Created by IntelliJ IDEA.
  User: lirance
  Date: 15/5/16
  Time: 下午2:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  %>


<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>drrr聊天室 首页</title>
    <link rel="stylesheet" href="/css/roomList.css">
    <style type="text/css">

        a:link {

            text-decoration:none;
        }
        a:visited {

            text-decoration:none;
        }
        a:hover {

            text-decoration:underline;
        }
        a:active {

            text-decoration:none;
        }
    </style>

</head>
<body>


<div id="head">


    <img id="logo-style" src="images/logomini.png" width="70" height="70" />
    <span  id="headstyle"> Drrr chat room</span>
    <div class="navigation">
        <a href="userProfile.jsp"><img id="touxiang-position" src="images/TouXiang/1.png" width="45" height="45"/></a>
        <span id="usernamestyle" >${sessionScope.user.username}</span>


        <span id="span-style">|</span>
        <a href="login.jsp"><span id="spanexitstyle">exit</span></a>
    </div>

</div>


<div id="text" >


    <s:iterator var="chatRoom" value="chatRoomlists">

        <div class="event">
            <span>Max&nbsp;<s:property value="#chatRoom.membernum"/></span>
            <div class="info">
                <s:property value="#chatRoom.ownerUserEntity.username"/>  &nbsp;&nbsp;&nbsp;&nbsp;
                <s:if test="#chatRoom.type==1">长期</s:if>
                <s:else>短期</s:else>

                <br>
                <a href='<s:url value="EnterRoom.action"> <s:param name="id" value="#chatRoom.id" /></s:url>'>${chatRoom.roomname}</a>
            </div>
            <div class="num">
                <s:property value="#chatRoom.onlineNum"/>
            </div>
        </div>

    </s:iterator>


    <br/>

    <a href="createChatRoom.jsp"><input type="button" id="post-button" value="创建房间" /></a>

</div>


</body>
</html>
